# 1 super()查找父类 适合于 单继承
# 2 super()如果有2个老爹

# 1 定义师父类
class Master(object):
    # 1.1 init
    def __init__(self):
        self.kongfu = '[传统方法]'

    # 1.2 摊煎饼方法 make_cake
    def make_cake(self):
        print(f'使用{self.kongfu}摊煎饼')


class Prentice(Master):
    def __init__(self):
        self.kongfu = '[独创方法]'

    def make_cake(self):
        print(f'使用{self.kongfu}摊煎饼')

    def make_cake_bysuper(self):
        super().__init__()
        super().make_cake()


# 3 测试继承
xiaoming = Prentice()
xiaoming.make_cake()
print(xiaoming.kongfu)

xiaoming.make_cake_bysuper()
